<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/aftersaleinfo/q_serve_gclicense/q_serve_gcLicense.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/aftersaleinfo/q_serve_gclicense/q_serve_gcLicense.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '分析仪许可',
                name: 'q_serve_gclicense/q_serve_gcLicense',
                url: "/q_serve_gcLicense/",
                sortName: "Voucher_sub"
            });
            const editFormFields = ref({"Voucher_sub":"","Sales_contract_voucher_sub":"","Client":"","Project_name":"","SN":"","activationdate":"","deadline":"","Remark":"","Image":"","Attachment":""});
            const editFormOptions = ref([[{"title":"单据编码","field":"Voucher_sub","disabled":true,"colSize":6},
                               {"title":"合同编码","field":"Sales_contract_voucher_sub","colSize":6}],
                              [{"dataKey":"无条件客户","data":[],"title":"客户名称","required":true,"field":"Client","colSize":6,"type":"select"},
                               {"title":"项目名称","required":true,"field":"Project_name","colSize":6}],
                              [{"title":"SN编码","required":true,"field":"SN"},
                               {"title":"激活日期","required":true,"field":"activationdate","type":"date"},
                               {"title":"截止日期","required":true,"field":"deadline","type":"date"}],
                              [{"title":"备注","field":"Remark","colSize":12,"type":"textarea"}],
                              [{"title":"图片","field":"Image","type":"img"},
                               {"title":"附件","field":"Attachment","type":"file"}]]);
            const searchFormFields = ref({"Voucher_sub":"","Sales_contract_voucher_sub":"","Client":"","Project_name":""});
            const searchFormOptions = ref([[{"title":"单据编码","field":"Voucher_sub","type":"like"},{"title":"合同编码","field":"Sales_contract_voucher_sub","type":"like"},{"dataKey":"无条件客户","data":[],"title":"客户名称","field":"Client","type":"like"},{"title":"项目名称","field":"Project_name","type":"like"}]]);
            const columns = ref([{field:'Voucher_sub',title:'单据编码',type:'string',link:true,width:120,readonly:true,align:'left',sort:true},
                       {field:'Sales_contract_voucher_sub',title:'合同编码',type:'string',width:120,align:'left'},
                       {field:'Client',title:'客户名称',type:'string',bind:{ key:'无条件客户',data:[]},width:120,require:true,align:'left'},
                       {field:'Project_name',title:'项目名称',type:'string',width:220,require:true,align:'left'},
                       {field:'SN',title:'SN编码',type:'string',width:220,require:true,align:'left'},
                       {field:'activationdate',title:'激活日期',type:'datetime',width:150,require:true,align:'left',sort:true},
                       {field:'deadline',title:'截止日期',type:'datetime',width:150,require:true,align:'left',sort:true},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'Image',title:'图片',type:'img',width:110,align:'left'},
                       {field:'Attachment',title:'附件',type:'file',width:110,align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人员',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'id',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Uid',title:'UID',type:'string',width:220,hidden:true,align:'left'},
                       {field:'Key',title:'KEY',type:'string',width:220,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
